﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Report_CaiGou_Day.aspx.cs" Inherits="syc.Sale.Report_CaiGou_Day" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
<div align="center">
    <p>
      <h2>主要原材料到货日报表</h2></p>
    <form id="form1" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"  
        DataSourceID="SqlDataSource1" style="text-align: center"  BorderColor="Black" 
                BorderStyle="Solid" BorderWidth="2px">
        <Columns>
            <asp:BoundField DataField="主材名称" HeaderText="主材名称" SortExpression="主材名称" />
            <asp:BoundField DataField="单位" HeaderText="单位" SortExpression="单位" />
            <asp:BoundField DataField="名称" HeaderText="供应单位" SortExpression="名称" />
            <asp:BoundField DataField="当日到货量" HeaderText="当日到货量(t)" ReadOnly="True" 
                SortExpression="当日到货量" />
            
            <asp:BoundField DataField="当月累计量" HeaderText="当月累计量(t)" 
                SortExpression="当月累计量" />
            
            <asp:BoundField DataField="当月合同量" HeaderText="当月合同量(t)" 
                SortExpression="当月合同量" />
            
            <asp:BoundField DataField="当年累计量" HeaderText="当年累计量(t)" 
            SortExpression="当年累计量"/>
            
            <asp:BoundField DataField="到货日期" HeaderText="到货日期" SortExpression="到货日期" 
                DataFormatString="{0:d}" />            
            
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SCMConnectionString2 %>" 
        SelectCommand="select 主材名称,单位,名称,sum(当日到货量)as 当日到货量,到货日期,dbo.当月累计(主材名称,名称,到货日期,'2009-08-01') as 当月累计量,dbo.当月合同量(主材名称,名称,到货日期,'2009-08-01') as 当月合同量,dbo.当年累计(主材名称,名称,到货日期) as 当年累计量 from 主要原材料到货日记录
group by 主材名称,名称,单位,到货日期,dbo.当月累计(主材名称,名称,到货日期,'2009-08-01'),dbo.当月合同量(主材名称,名称,到货日期,'2009-08-01'),dbo.当年累计(主材名称,名称,到货日期)"
>
    </asp:SqlDataSource>
    </div>
    </form>
</body>
</html>
